<template>
	<view>
		<view class="delete" v-if="type != 'add'">
			<image class="img" src="@/static/img/delete.png" mode="widthFix"></image>
		</view>
		<view>
			<view class="id_input">
				<view class="id_size">请输入:</view>
				<u-input :clearable="false" height="95" v-model="value" type="text" placeholder="请输入" />
			</view>
		</view>
		
		<view class="Permissions">
			<view class="Permissions_s">
				<view class="Permissions_qx">权限</view>
				<view class="collapse">
					<u-collapse>
						<u-collapse-item :title="item.head" :open="item.open" v-for="(item, index) in itemList" :key="index">
							<view class="header" slot='title-all' :style="index == 0 ? 'background-color: rgba(243, 6, 13, 0.2);' : ''">
								<view class="tips">
									<view class="icons">
										<u-icon name="arrow-down" :color="index == 0 ? '#F3060D' : '#666'" size="28"></u-icon>
										<image class="img" src="@/static/img/project.png" mode="widthFix"></image>
									</view>
									<view class="title" :style="{ color: index == 0 ? '#F3060D' : '#666' }">
										商品
									</view>
								</view>
								<view class="choose">
									<image class="img" src="@/static/img/r-point.png" mode="widthFix"></image>
								</view>
							</view>
							<view>
								<view class="items" v-for="(t, ti) in 2" :key="ti">
									<view class="label">
										<image class="img" src="@/static/img/file.png" mode="widthFix"></image>
										标签编辑
									</view>
									<view class="icon">
										<image class="img" src="@/static/img/r-point.png" mode="widthFix"></image>
									</view>
								</view>
							</view>
						</u-collapse-item>
					</u-collapse>
				</view>
			</view>
			
		</view>
		
		<view class="dc_top">
			<view class="dc_btn" @click="toPath">完成</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				value: '',
				itemList: [{
					head: "商品",
					open: true
				},{
					head: "商品",
					open: true
				},{
					head: "商品",
					open: true
				}],
			}
		},
		onLoad(e) {
			this.type = e.type
		}
	}
</script>

<style lang="scss" scoped>
	.dc_top {
		position: fixed;
		bottom: 80rpx;
		width: 100%;
		padding: 0rpx 37rpx;
		left: 0;
		.dc_btn {
			height: 88rpx;
			border-radius: 44rpx;
			background: linear-gradient(147.27deg, #F1714E 0%, #E93E30 100%);
			font-size: 32rpx;
			font-weight: 500;
			line-height: 44rpx;
			color: #FFF;
			display: flex;
			align-items: center;
			justify-content: center;
		}
	}
	::v-deep .u-collapse-head {
		padding: 0!important;
	}
	.collapse {
		width: calc(100% - 125rpx);
		::v-deep .u-collapse-content {
			display: flex;
			justify-content: flex-end;
		}
		.items {
			display: flex;
			align-items: center;
			justify-content: space-between;
			height: 95rpx;
			width: 437rpx;
			padding: 0 20rpx;
			box-sizing: border-box;
			.icon {
				.img {
					width: 20rpx;
				}
			}
			.label {
				display: flex;
				align-items: center;
				font-weight: 24rpx;
				font-weight: 400;
				color: #666666;
				.img {
					width: 30rpx;
					margin-right: 10rpx;
				}
			}
		}
		.header {
			display: flex;
			align-items: center;
			justify-content: space-between;
			// background-color: rgba(243, 6, 13, 0.2);
			width: 100%;
			padding: 0 auto;
			height: 95rpx;
			padding: 0 20rpx;
			.tips {
				margin-right: 100rpx;
				display: flex;
				align-items: center;
				.title {
					margin-left: 40rpx;
					background-color: rgba(255, 255, 255, 0);
					color: #F3060D;
				}
				.icons {
					display: flex;
					align-items: center;
					.img {
						width: 40rpx;
						margin-left: 20rpx;
					}
				}
				
			}
			.choose {
				.img {
					width: 20rpx;
				}
			}
		}
	}
	
	
	.big-img {
		margin-top: 20rpx;

		.img {
			width: 100%;
		}
	}

	.title {
		background-color: #FFF;
	}

	.delete {
		display: flex;
		justify-content: flex-end;
		padding: 23rpx 20rpx 0;

		.img {
			width: 42rpx;
		}
	}

	.id_input {
		display: flex;
		align-items: center;
		background: #FFFFFF;
		padding-left: 30rpx;
		border-radius: 10rpx;
		margin-top: 20rpx;
		.id_size {
			font-size: 28rpx;
			font-weight: 500;
			line-height: 39rpx;
			color: #333333;
			margin-right: 36rpx;
			
		}
	}
	.Permissions{
		display: flex;
		background: #FFF;
		box-sizing: border-box;
		width: 100%;
		margin-top: 20rpx;
		.Permissions_s{
			padding-left:30rpx;
			display: flex;
			width: 100%;
			box-sizing: border-box;
			.Permissions_qx{
				font-size: 28rpx;
				font-weight: 500;
				line-height: 39rpx;
				color: #333333;
				white-space:nowrap;
				height: 95rpx;
				display: flex;
				align-items: center;
				width: 125rpx;
			}
		}
	}

</style>
<style>
	page {
		background-color: #F4F5F7;
		padding: 0 20rpx;
		box-sizing: border-box;
	}
</style>